﻿using Eleven.BreakAway.Model;
using System.Data.Entity.ModelConfiguration;

namespace Eleven.BreakAway.DataAccess
{
    class PersonPhotoConfiguration : EntityTypeConfiguration<PersonPhoto>
    {
        public PersonPhotoConfiguration()
        {
            ToTable("PersonPhotos");
            HasKey(p => p.PersonId);
            HasRequired(p => p.PhotoOf).WithOptional(p => p.Photo);
        }
    }
}
